﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SiteMasterTest
{
    public partial class Site : System.Web.UI.MasterPage
    {
        protected string CurrentUser { get; set; }
        protected string CurrentPassword { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            CurrentUser = Request.QueryString["Username"];
            CurrentPassword = Request.QueryString["Password"];
            InitPage();           
        }

        protected void InitPage()
        {
            UserNameLabel.Text = CurrentUser;
        }

        protected void HomeButton_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("MediaSelect.aspx?Username=" + this.CurrentUser + "&Password=" + this.CurrentPassword);
        }

        protected void MediaListButton_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("Medialist.aspx?Username=" + this.CurrentUser + "&Password=" + this.CurrentPassword);
        }

        protected void FriendsListButton_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("Friendslist.aspx?Username=" + this.CurrentUser + "&Password=" + this.CurrentPassword);
        }

        protected void MoviesButton_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("Movies.aspx?Username=" + this.CurrentUser + "&Password=" + this.CurrentPassword);
        }

        protected void GamesButton_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("Games.aspx?Username=" + this.CurrentUser + "&Password=" + this.CurrentPassword);
        }

        protected void BooksButton_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("Books.aspx?Username=" + this.CurrentUser + "&Password=" + this.CurrentPassword);
        }

        protected void ConsoleButton_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("Console.aspx?Username=" + this.CurrentUser + "&Password=" + this.CurrentPassword);
        }
    }
}